package com.itheima.utils;

import java.util.UUID;

public class UUIDUtil {
    /**
     * 得到的数据格式：dfef86c8-888e-46e3-8b5a-423a9598101d
     * @return
     */
    public static String getUUID() {
        return UUID.randomUUID().toString();
    }

    /**
     * 得到的数据格式:57dbc71aeaf1487e9698a8e779bd2c38
     * @return
     */
    public static String getSimpleUUID() {
        return UUID.randomUUID().toString().replace("-","");
    }

    public static void main(String[] args) {
        System.out.println(getUUID());
        System.out.println(getSimpleUUID());
    }
}
